package com.cuitrip.presenter;

import android.app.Activity;
import android.text.SpannableString;
import android.text.SpannableStringBuilder;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;

import com.cuitrip.app.UserConfig;
import com.cuitrip.app.base.PartViewHolder;
import com.cuitrip.component.item.ItemLayout;
import com.cuitrip.service.R;
import com.cuitrip.util.SpanUtil;

import butterknife.ButterKnife;
import butterknife.Bind;

/**
 * Created by baziii on 15/8/10.
 */
public class RefundInfoViewHolder implements PartViewHolder<FeeRenderData> {
    public static final int RES = R.layout.ct_service_part_little;
//    @Bind(R.id.payed_layout)
//    ItemLayout mPayLayout;
//    @Bind(R.id.cut_layout)
//    ItemLayout mCutLayout;
//    @Bind(R.id.return_layout)
//    ItemLayout mReturnLayout;

    @Bind(R.id.money_type)
    TextView moneyType;

    @Bind(R.id.refund_fee)
    TextView refundFee;

    @Bind(R.id.total_pay)
    TextView totalPay;

    @Bind(R.id.cancellation_fee)
    TextView cancellationFee;

    public void build(View view) {
        ButterKnife.bind(this, view);
    }
    
    public void render(FeeRenderData data) {
        /*SpannableString spannableString = new SpannableString("");
        if (!TextUtils.isEmpty(UserConfig.getSettingMoneyType())) {
            spannableString = SpanUtil.getColorSpanString(R.color.orange_ff755a, UserConfig.getSettingMoneyType().toUpperCase() + " ");
        }

        mPayLayout.setmRightText(new SpannableStringBuilder(spannableString).append(data.orderPrice));
        mCutLayout.setmRightText(new SpannableStringBuilder(spannableString).append(data.penalty));
        mReturnLayout.setmRightText(new SpannableStringBuilder(spannableString).append(data.refund));*/
       // moneyType.setText();
        refundFee.setText(data.refund);
        totalPay.setText(data.orderPrice);
        cancellationFee.setText(data.penalty);
    }
}
